package xdu.lz.aop.annotaion;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @date 2020/5/3 12:51
 */
public class Main {
    public static void main(String[] args) {
        ApplicationContext context
                 = new AnnotationConfigApplicationContext(Config.class);
//        Car car = (Car) context.getBean("c");
        Car car = context.getBean(Car.class);
		car.drive();
		//11
		System.out.println(context.getBean(MyAspect.class));
//		Bike bike = (Bike) context.getBean("b");
//		bike.drive();
//		System.out.println("===============");

	}
}
